﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using Microsoft.Xna.Framework;
using Microsoft.Xna.Framework.Graphics;

namespace hud_lib
{
    public class Button : CItem
    {
        public Button(Point position, Point size, Texture2D texture, GraphicsDevice graphicsDevice)
            : base(position, size)
        {
            m_texture = texture;
            m_spriteBatch = new SpriteBatch(graphicsDevice);
        }

        public void Draw()
        {
            m_spriteBatch.Begin();
            m_spriteBatch.Draw(m_texture, new Rectangle(m_position.X, m_position.Y, m_size.X, m_size.Y),
                Color.White);
            m_spriteBatch.End();
        }

        private Texture2D m_texture;
        private SpriteBatch m_spriteBatch;
    }
}
